package com.qq.server;

import com.qq.service.ServerService;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author： Aeolia
 * @Description： TODO
 * @Date： 2021/10/17 1:17
 */
public class Server {

    public static void main(String[] args) {
        // 创建服务器
        try {
            ServerSocket serverSocket=new ServerSocket(8888);
            while (true){
                Socket socket = serverSocket.accept();
                ServerService serverService=new ServerService(socket);
                serverService.start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
